﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GraphicalSVN.GraphicSource.Dto;
using GraphicalSVN.GraphicSource;

namespace GraphicalSVN.StructureMapConfiguration
{
    public static class Setup
    {
        public static void ForGenerator(GeneratorInfo gi)
        {
            StructureMap.ObjectFactory.Initialize(x => {
                x.For<IGraphicalSource>().Use<GraphicalSource>();
                x.For<GeneratorInfo>().Use(gi);
            });
        }

        public static T GetInstance<T>()
        {
            return StructureMap.ObjectFactory.GetInstance<T>();
        }
    }
}
